/*
 * Copyright © 2018 www.noark.xyz All Rights Reserved.
 * 
 * 感谢您选择Noark框架，希望我们的努力能为您提供一个简单、易用、稳定的服务器端框架 ！
 * 除非符合Noark许可协议，否则不得使用该文件，您可以下载许可协议文件：
 * 
 * 		http://www.noark.xyz/LICENSE
 *
 * 1.未经许可，任何公司及个人不得以任何方式或理由对本框架进行修改、使用和传播;
 * 2.禁止在本项目或任何子项目的基础上发展任何派生版本、修改版本或第三方版本;
 * 3.无论你对源代码做出任何修改和改进，版权都归Noark研发团队所有，我们保留所有权利;
 * 4.凡侵犯Noark版权等知识产权的，必依法追究其法律责任，特此郑重法律声明！
 */
package xyz.noark.log.slf4j;

import static xyz.noark.log.LogHelper.logger;

import java.io.Serializable;

import org.slf4j.Marker;

/**
 * Slf4j实现类.
 * <p>
 * 主要是桥接第三方的Slf4j功能，所以Info级别以下的就不输出了
 *
 * @since 1.0
 * @author 小流氓(176543888@qq.com)
 */
final class NoarkLogger implements org.slf4j.Logger, Serializable {
	private static final long serialVersionUID = 2365985747802107516L;

	@Override
	public String getName() {
		return "noark-logger";
	}

	@Override
	public boolean isTraceEnabled() {
		return false;
	}

	@Override
	public void trace(String msg) {
		this.debug(msg);
	}

	@Override
	public void trace(String format, Object arg) {
		this.debug(format, arg);
	}

	@Override
	public void trace(String format, Object arg1, Object arg2) {
		this.debug(format, arg1, arg2);
	}

	@Override
	public void trace(String format, Object... arguments) {
		this.debug(format, arguments);
	}

	@Override
	public void trace(String msg, Throwable t) {
		this.debug(msg, t);
	}

	@Override
	public boolean isDebugEnabled() {
		return false;
	}

	@Override
	public void debug(String msg) {
		// logger.debug(msg);
	}

	@Override
	public void debug(String format, Object arg) {
		// logger.debug(format, arg);
	}

	@Override
	public void debug(String format, Object arg1, Object arg2) {
		// logger.debug(format, arg1, arg2);
	}

	@Override
	public void debug(String format, Object... arguments) {
		// logger.debug(format, arguments);
	}

	@Override
	public void debug(String msg, Throwable t) {
		// logger.debug(msg, t);
	}

	@Override
	public boolean isInfoEnabled() {
		return true;
	}

	@Override
	public void info(String msg) {
		logger.info(msg);
	}

	@Override
	public void info(String format, Object arg) {
		logger.info(format, arg);
	}

	@Override
	public void info(String format, Object arg1, Object arg2) {
		logger.info(format, arg1, arg2);
	}

	@Override
	public void info(String format, Object... arguments) {
		logger.info(format, arguments);
	}

	@Override
	public void info(String msg, Throwable t) {
		logger.info(msg, t);
	}

	@Override
	public boolean isWarnEnabled() {
		return true;
	}

	@Override
	public void warn(String msg) {
		logger.warn(msg);
	}

	@Override
	public void warn(String format, Object arg) {
		logger.warn(format, arg);
	}

	@Override
	public void warn(String format, Object... arguments) {
		logger.warn(format, arguments);
	}

	@Override
	public void warn(String format, Object arg1, Object arg2) {
		logger.warn(format, arg1, arg2);
	}

	@Override
	public void warn(String msg, Throwable t) {
		logger.warn(msg, t);
	}

	@Override
	public boolean isErrorEnabled() {
		return true;
	}

	@Override
	public void error(String msg) {
		logger.error(msg);
	}

	@Override
	public void error(String format, Object arg) {
		logger.error(format, arg);
	}

	@Override
	public void error(String format, Object arg1, Object arg2) {
		logger.error(format, arg1, arg2);
	}

	@Override
	public void error(String format, Object... arguments) {
		logger.error(format, arguments);
	}

	@Override
	public void error(String msg, Throwable t) {
		logger.error(msg, t);
	}

	@Override
	public boolean isTraceEnabled(Marker marker) {
		return true;
	}

	@Override
	public void trace(Marker marker, String msg) {
		logger.debug(msg);
	}

	@Override
	public void trace(Marker marker, String format, Object arg) {
		logger.debug(format, arg);
	}

	@Override
	public void trace(Marker marker, String format, Object arg1, Object arg2) {
		logger.debug(format, arg1, arg2);
	}

	@Override
	public void trace(Marker marker, String format, Object... argArray) {
		logger.debug(format, argArray);
	}

	@Override
	public void trace(Marker marker, String msg, Throwable t) {
		logger.debug(msg, t);
	}

	@Override
	public boolean isDebugEnabled(Marker marker) {
		return true;
	}

	@Override
	public void debug(Marker marker, String msg) {
		logger.debug(msg);
	}

	@Override
	public void debug(Marker marker, String format, Object arg) {
		logger.debug(format, arg);
	}

	@Override
	public void debug(Marker marker, String format, Object arg1, Object arg2) {
		logger.debug(format, arg1, arg2);
	}

	@Override
	public void debug(Marker marker, String format, Object... arguments) {
		logger.debug(format, arguments);
	}

	@Override
	public void debug(Marker marker, String msg, Throwable t) {
		logger.debug(msg, t);
	}

	@Override
	public boolean isInfoEnabled(Marker marker) {
		return true;
	}

	@Override
	public void info(Marker marker, String msg) {
		logger.info(msg);
	}

	@Override
	public void info(Marker marker, String format, Object arg) {
		logger.info(format, arg);
	}

	@Override
	public void info(Marker marker, String format, Object arg1, Object arg2) {
		logger.info(format, arg1, arg2);
	}

	@Override
	public void info(Marker marker, String format, Object... arguments) {
		logger.info(format, arguments);
	}

	@Override
	public void info(Marker marker, String msg, Throwable t) {
		logger.info(msg, t);
	}

	@Override
	public boolean isWarnEnabled(Marker marker) {
		return true;
	}

	@Override
	public void warn(Marker marker, String msg) {
		logger.warn(msg);
	}

	@Override
	public void warn(Marker marker, String format, Object arg) {
		logger.warn(format, arg);
	}

	@Override
	public void warn(Marker marker, String format, Object arg1, Object arg2) {
		logger.warn(format, arg1, arg2);
	}

	@Override
	public void warn(Marker marker, String format, Object... arguments) {
		logger.warn(format, arguments);
	}

	@Override
	public void warn(Marker marker, String msg, Throwable t) {
		logger.warn(msg, t);
	}

	@Override
	public boolean isErrorEnabled(Marker marker) {
		return true;
	}

	@Override
	public void error(Marker marker, String msg) {
		logger.error(msg);
	}

	@Override
	public void error(Marker marker, String format, Object arg) {
		logger.error(format, arg);
	}

	@Override
	public void error(Marker marker, String format, Object arg1, Object arg2) {
		logger.error(format, arg1, arg2);
	}

	@Override
	public void error(Marker marker, String format, Object... arguments) {
		logger.error(format, arguments);
	}

	@Override
	public void error(Marker marker, String msg, Throwable t) {
		logger.error(msg, t);
	}
}